package com.supermap.agricultural_meteoro.monitor.controller;

import com.supermap.agricultural_meteoro.monitor.common.ResponseData;
import com.supermap.agricultural_meteoro.monitor.service.SPSSService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping(value = "SPSS")
public class SPSSMonitorController {

    @Resource
    private SPSSService spssService;

    @RequestMapping(value = "getUserSPSSInformation", method = RequestMethod.GET)
    @ResponseBody
    public ResponseData getUserSPSSInformation(HttpServletRequest request) {
        String userId = request.getParameter("userId");
        return spssService.getUserSPSSInformation(userId);
    }
}
